import Vue from 'vue'
import Vuex from 'vuex'
import persistedState from 'vuex-persistedstate'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    userinfo: {},
    routePath: 'home'
  },
  getters: {
  },
  mutations: {
    editUserInfo: (state, data) => {
      state.userinfo = data
    },
    editRoutePath: (state, data) => {
      state.routePath = data
    },
  },
  actions: {
  },
  modules: {
  },
  plugins: [persistedState()],
})
